From 180c9577f8337991ca71470816333fe8430cd3ca Mon Sep 17 00:00:00 2001 From: real-zephex Date: Fri, 24 May 2024 22:51:36 +0530 Subject: =?UTF-8?q?=E2=9C=A8=20feat(ui):=20=F0=9F=8E=A8=20migrate=20from?= =?UTF-8?q?=20vanilla=20css=20to=20tailwind=20css,=20adopted=20next=20ui?= =?UTF-8?q?=20and=20restructured?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/kdrama/[id]/page.jsx | 92 +++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 56 deletions(-) (limited to 'src/app/kdrama/[id]/page.jsx') diff --git a/src/app/kdrama/[id]/page.jsx b/src/app/kdrama/[id]/page.jsx index 9cb3cd8..d94810e 100644 --- a/src/app/kdrama/[id]/page.jsx +++ b/src/app/kdrama/[id]/page.jsx @@ -1,66 +1,46 @@ -import styles from "../styles/info.module.css"; -import Image from "next/image"; -import EpisodesButtons from "./buttons"; -import { PreFetchVideoLinks } from "../components/cacher"; +import { Chip, Image } from "@nextui-org/react"; +import DescriptionTabs from "../components/infoTabs"; +import { dramaInfo } from "../components/requests"; +import EpisodesContainer from "../components/episodesContainer"; export default async function DramaInfo({ params }) { const id = decodeURIComponent(params.id); - const info = await getDramaInfo(id); - - PreFetchVideoLinks(info.episodes, id); + const data = await dramaInfo(id); return ( -
- {info && ( -
-
-

{info.title}

- Drama Poster -
- - {/* Drama description */} -
-

Description

-

{info.description}

-
- - {/* Genres */} -
- Genres: - {info.genres && - info.genres.map((item, index) => ( -

{item}

- ))} -
- - {/* Other names */} -
- AKA: - {info.otherNames && - info.otherNames.map((item, index) => ( -

{item}

+
+
+ Anime Title Poster +
+

+ {data.title} +

+
+ {data.genres && + data.genres.map((item, index) => ( + +

{item}

+
))}
- - {/* Episodes Buttons */} -
- )} -
- ); -} - -async function getDramaInfo(id) { - const res = await fetch( - `https://consumet-jade.vercel.app/movies/dramacool/info?id=${id}`, - { next: { revalidate: 21600 } } +
+ + +
+
+
+ ); - const data = await res.json(); - return data; } -- cgit v1.2.3